<!-- 分页 -->
<template>
  <div class="pagination">
    <div style="flex:1;"></div>
    <a-pagination
      :current="current"
      :total="total"
      :show-total="total => `共 ${total} 条记录`"
      :size="size"
      :defaultPageSize="defaultPageSize"
      showSizeChanger
      showQuickJumper
      @change="pageChange"
      @showSizeChange="sizeChange"
    />
  </div>
</template>

<script>
export default {
  props: {
    current: {
      type: Number,
      required: true,
      default: 1
    },
    total: {
      type: Number,
      required: true,
      default: 0
    },
    showSizeChanger: {
      type: Boolean,
      required: false,
      default: () => true
    },
    showQuickJumper: {
      type: Boolean,
      required: false,
      default: () => true
    },
    pageChange: {
      type: Function,
      required: true
    },
    sizeChange: {
      type: Function,
      required: false
    },
    // 分页器大小
    size: {
      type: String,
      default: 'default'
    },
    defaultPageSize: {
      type: Number,
      default: 10
    }
  },
  components: {},
  data() {
    return {}
  },
  computed: {},
  watch: {},
  methods: {
    // onChange(page, pageSize){
    //     console.log(page, pageSize)
    // }
  },
  created() {},
  mounted() {}
}
</script>
<style scoped>
.pagination {
  display: flex;
  margin-top: 20px;
}
</style>
